<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script>

        class Dog {
            constructor(color) {
                this.type = '狗子' ;
                this.say = '汪' ;
                this.color = color ;
            }

            speak() {}
        }



        // extends  继承
        // super()
        class KeJi extends Dog {
            constructor(name , age , color) {
                // 继承
                super(color) ;
                this.name = name ;
                this.age = age ; 
            }

        }

    

        const k = new KeJi('cc' , 3 , 'red') ;
        
        console.log(k);

    </script>
    
</body>
</html>